package cn.jiyun.service.impl;

import cn.jiyun.dao.UserDao;
import cn.jiyun.pojo.User;
import cn.jiyun.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;


    @Override
    public List<User> findAll() {
        return userDao.findUserAll();
    }

    @Override
    public void del(Integer uid) {
        userDao.del(uid);
    }

    @Override
    public User findByUid(Integer uid) {
        return userDao.findByUid(uid);
    }

    @Override
    public void update(User user) {
        userDao.update(user);
    }

    @Override
    public void add(User user) {
        userDao.add(user);
    }
}
